home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / INTERNET / HTML Grinder 3.21.sit / HTML Grinder / Grinder Tools / Color Calculator / background_2699.xml next >
Extensible Markup Language  |  1997-07-01  |  2KB  |  13 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>2699</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_3266.css" />
  10.     <name></name>
  11.     <script>function hexToInt data  -- Convert two hex bytes into an unsigned short integer.put 0 into myIntrepeat with i = 1 to 4multiply myInt by 16add offset(char (char i of "3412") of data,"0123456789ABCDEF") to myIntend repeatreturn myIntend hexToIntfunction inttoHex dataput trunc(data/16) into baseput (data mod 16) into remainder-- return base && "-" && remainderif base >0 then put char base of "123456789ABCDEF" into baseif remainder > 0 then put char remainder of "123456789ABCDEF" into remainderreturn base & remainderend inttohexfunction rgbtohex inputrepeat with x =1 to the number of items in inputput inttohex(trunc(item x of input/256)) into item  x of inputend repeatreturn item 1 of input & item 2 of input & item 3 of inputend rgbtohexfunction hextorgb inputif length(input) <> 6 then return "Error"put char 1 to 2 of input into redput char 3 to 4 of input into greenput char 5 to 6 of input into blueput ((hextoint(red) +1) *256) -1 into redput ((hextoint(green) +1) *256) -1 into greenput ((hextoint(blue) +1) *256) -1 into bluereturn red & "," & green & "," & blueend hextorgbon pickcolorput cd fld hexcode into codeput hextorgb(code) into codeif code is "Error" then put "65535,65535,65535" into codeget choosecolor("(Use Balloon Help for more info.)",code)if it is not ""thenput rgbtohex(it) into cd fld hexcodeselect text of cd fld hexcodeend ifend pickcoloron resetwheelput "3BC578" into cd fld hexcodepass resetwheelend resetwheel</script>
  12. </background>
  13.